<template>
  <el-table
    border
    highlight-current-row
    v-loading="loading"
    :data="userList"
    :header-cell-style="{ background: '#EDF6FF' }"
  >
    <!-- :width="item.width" -->
    <el-table-column v-for="(item, index) in userAttrs" :key="index" :label="item.label" align="center">
      <template slot-scope="{ row }">
        <span>{{ ((item.format ? item.format(row[item.key]) : row[item.key]) || item.default) | defaultTxt }}</span>
      </template>
    </el-table-column>
  </el-table>
</template>

<script>
const vipObj = {
  "0": '非会员',
  "1": '会员',
  "2": '失效会员',
}
export default {
  components: {},
  props: {
    userList: {
      type: Array,
      default() {
        return [];
      },
    },
  },
  data() {
    return {
      loading: false,
      userAttrs: [
        { key: "nickname", label: "昵称" },
        { key: "mobile", label: "手机号" },
        { key: "agentId", label: "经纪人ID" },
        { key: "authCity", label: "城市" },
        { key: "channelName", label: "来源渠道" },
        { key: "sceneName", label: "场景值" },
        { key: "memberSign", label: "会员属性", format: (v) => vipObj[v] },
        { key: "memberAmount", label: "会员金额" },
        { key: "agentCreateTime", label: "经纪人创建日期" },
        { key: "memberStartDate", label: "会员开通日期" },
        { key: "memberEndDate", label: "会员到期日期" },
        { key: "lastDelTime", label: "最新体验日期" },
        { key: "delCnt", label: "体验数" },
        { key: "sourceUserName", label: "归属销售名称" },
        { key: "channelAdminName", label: "所属销管名称" },
      ],
    };
  },
  created() {
    
  },
  mounted() {},
  watch: {},
  computed: {},
  methods: {},
  // render() {

  // }
};
</script>
<style></style>
